#include<stdio.h>
int main()
{
  int a,b1,b2,b3;
  scanf("%d",&a);
  b1 = a/100;
  a = a%100;
  b2 = a/10;
  b3 = a%10;
  printf("%d\f",b3*100+b2*10+b1);
  return 0;
}
